//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WxaUpdatableMessage, WxaUpdatableMessageResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWxaUpdatableMessageList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WxaUpdatableMessageResponse>(`/uctoo/wxa_updatable_message/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWxaUpdatableMessage = async (id: string) => {
  return requestClient.get<WxaUpdatableMessage>(`/uctoo/wxa_updatable_message/${id}`);
};

export const adductooWxaUpdatableMessage = async (data: Partial<WxaUpdatableMessage>) => {
  return requestClient.post<WxaUpdatableMessage>('/uctoo/wxa_updatable_message/add', data);
};

export const edituctooWxaUpdatableMessage = async (data: Partial<WxaUpdatableMessage>) => {
  return requestClient.post<WxaUpdatableMessage>('/uctoo/wxa_updatable_message/edit', data);
};

export const deleteuctooWxaUpdatableMessage = async (id: string) => {
  return requestClient.post<any>('/uctoo/wxa_updatable_message/del', { id });
};
